class Parent {
    public String name="acer";
}
class Child extends Parent {
    public void func() {
        this.name = "huawei";
    }
}
public class Main{
    public static void main(String[] args) {
        Child child = new Child();
        System.out.println(child.name);       // acer
        child.func();
        System.out.println(child.name);       //huawei
    }
}